package ticketing_system.register_login;

import ticketing_system.Database.Database_vip;
import ticketing_system.Database.Database_vipDAO;

import java.util.Scanner;

public class register {
    public void Add() throws Exception{
        Scanner sc = new Scanner(System.in);
        Database_vipDAO dao = new Database_vipDAO();
        Database_vip a = new Database_vip();
        System.out.print("请输入您的用户名:");
        a.setUsername(sc.next());
        System.out.print("请输入您的密码:");
        a.setPassword(sc.next());
        int res = dao.add(a);
        if (res > 0) {
            System.out.print("恭喜您成为我们尊贵的vip用户");
        } else {
            System.out.print("系统错误ERROR!");
        }
    }
}
